Skip to content

Determine Spring Boot version on startup correctly when using Jigsaw #16182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 112 commits into from

Conversation

hsellik
Copy link
Contributor

@hsellik hsellik commented Mar 9, 2019

In Java 9, a package may return null for its implementation version
even when the manifest attribute specifying the version is present
in the jar from which the package was loaded.

This commit updates SpringBootVersion to fall back to
accessing the jar and its manifest attributes directly when the
implementation version of its package is null.

Closes gh-10233

In Java 9, a package may return null for its implementation version
even when the manifest attribute specifying the version is present
in the jar from which the package was loaded.

This commit updates SpringBootVersion to fall back to
accessing the jar and its manifest attributes directly when the
implementation version of its package is null.

Closes spring-projectsgh-10233
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 9, 2019
snicoll and others added 18 commits March 9, 2019 20:49
Previously, the import selector wrongly assumed that we should not
use constructor injection with Kotlin. Rather than looking up for the
primary constructor, we retrieve available constructors on the Java
counter-part.

This commit applies the same logic as in the constructor parameter
binder and checks for the primary constructor for Kotlin types.

See spring-projectsgh-8762
This commit detects a Kotlin constructor so that it is not required to
transmit the parameter names information to the Java side.

See spring-projectsgh-8762
@philwebb
Copy link
Member

Thanks for the fix. Since this is just a cosmetic problem I'm tempted to target it to 2.2 rather the 2.1 (which #10233 was originally targeted to).

@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 11, 2019
@philwebb philwebb added this to the 2.2.x milestone Mar 11, 2019
wilkinsona and others added 5 commits March 11, 2019 21:21
Update the `BaseConfiguration` class in `ScheduledTasksEndpointTests`
to be package private so that it can be enhanced by cglib.

Prior to merge commit 361437f the class was a lite configuration so
it didn't matter that it was a private class.
@pivotal-issuemaster
Copy link

@hsellik Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@hsellik Thank you for signing the Contributor License Agreement!

@hsellik
Copy link
Contributor Author

hsellik commented Apr 9, 2019

@philwebb is there something I can do to get this merged or are 2.2 pull requests getting merged in a later point in time? I can make a new pull request, which is not on my master branch (sorry for that).

@philwebb
Copy link
Member

philwebb commented Apr 9, 2019

@hsellik There's just a bit of a backlog at the moment as a lot of the team are away. There's no need for a new PR, we can just cherry-pick the commit.

@wilkinsona wilkinsona added type: enhancement A general enhancement and removed type: bug A general bug labels Apr 18, 2019
@wilkinsona wilkinsona modified the milestones: 2.2.x, 2.2.0.M3 Apr 18, 2019
wilkinsona pushed a commit that referenced this pull request Apr 18, 2019
In Java 9, a package may return null for its implementation version
even when the manifest attribute specifying the version is present
in the jar from which the package was loaded.

This commit updates SpringBootVersion to fall back to
accessing the jar and its manifest attributes directly when the
implementation version of its package is null.

See gh-16182
@wilkinsona
Copy link
Member

wilkinsona commented Apr 18, 2019

Thanks very much for the PR, @hsellik. I've cherry-picked the change and merged it into master along with a polish commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version label is not printed on startup with Jigsaw